﻿#ifndef ORDERFORMLIST_H
#define ORDERFORMLIST_H

#include <QWidget>
#include "orderformdetails.h"
#include "orderformcontent.h"
#include "orderformcomment.h"

namespace Ui {
class OrderFormList;
}

class OrderFormList : public QWidget
{
    Q_OBJECT
signals:
    void signalGainReserveList();
    void signalReserveCommentSubmit();
    void signalSubmitCommentImage(const QStringList&);
    void signalGainReserveDetails(const QString&);
    void signalDeleteReserve(const QString&);
    void signalGainHotelDetails(const QString&);

public:
    explicit OrderFormList(QWidget *parent = nullptr);
    ~OrderFormList();

    void reserveListClean();

public slots:
    void slotSetReserveList(bool result, const QString &state, const QString &commentState);
    void slotCommentReserve(const QStringList &strList);
    void slotSubmitCommentResult(bool result, QString msg);
    void slotSetReserveHotelImage(bool result,const QString& reserveID,const QImage& image);
    void slotSetReserveDetails(bool result,const QString& msg);
    void slotReserveDeleteResult(bool result,const QString& msg);

private:
    Ui::OrderFormList *ui;

    int m_contentCount[5];
    OrderFormComment *m_comment;
    OrderFormDetails *m_reserveDetails;
    QVector<OrderFormContent *> m_orderFormContentVector;
    QVector<OrderFormContent *> m_orderContentVector;
};

#endif // ORDERFORMLIST_H
